Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Determine tensorflow-probability requirements from python version #2452

Merged
merged 1 commit into from
Mar 12, 2024

Conversation

matthewfeickert
Copy link
Member

@matthewfeickert matthewfeickert commented Mar 12, 2024

Description


  • Split the requirements for the 'tensorflow' extra into two different conditional groups by python_version.
    • Starting with tensorflow v2.16.1, multiple changes were made that simplifies the installation of tensorflow across platform_machine and Keras v3.0 was adopted.
    • tensorflow-probability did not adopt Keras v3.0, but instead requires tf-keras. Starting in tensorflow-probability v0.24.0 the 'tensorflow-probability[tf]' extra was added which includes all the required dependencies to be able to use tensorflow-probability with tensorflow v2.15+.
    • tensorflow v2.16.1 and tensorflow-probability v0.24.0 support Python 3.9+, so for Python 3.8 support the 'tensorflow' requirements need to use the previous more verbose conditionals.
  • Reverts PR build: Disallow TensorFlow v2.16.1 #2448

Checklist Before Requesting Reviewer

  • Tests are passing
  • "WIP" removed from the title of the pull request
  • Selected an Assignee for the PR to be responsible for the log summary

Before Merging

For the PR Assignees:

  • Summarize commit messages into a comprehensive review of the PR
* Split the requirements for the 'tensorflow' extra into two different
  conditional groups by python_version.
   - Starting with tensorflow v2.16.1, multiple changes were made that simplifies
   the installation of tensorflow across platform_machine and Keras v3.0 was adopted.
   - tensorflow-probability did _not_ adopt Keras v3.0, but instead requires
   tf-keras. Starting in tensorflow-probability v0.24.0 the
   'tensorflow-probability[tf]' extra was added which includes all the required
   dependencies to be able to use tensorflow-probability with tensorflow v2.15+.
   - tensorflow v2.16.1 and tensorflow-probability v0.24.0 support Python 3.9+,
   so for Python 3.8 support the 'tensorflow' requirements need to use the
   previous more verbose conditionals.
* Reverts PR https://github.com/scikit-hep/pyhf/pull/2448

* Split the requirements for the 'tensorflow' extra into two different
  conditional groups by python_version.
   - Starting with tensorflow v2.16.1, multiple changes were made that simplifies
   the installation of tensorflow across platform_machine and Keras v3.0 was adopted.
   - tensorflow-probability did _not_ adopt Keras v3.0, but instead requires
   tf-keras. Starting in tensorflow-probability v0.24.0 the
   'tensorflow-probability[tf]' extra was added which includes all the required
   dependencies to be able to use tensorflow-probability with tensorflow v2.15+.
   - tensorflow v2.16.1 and tensorflow-probability v0.24.0 support Python 3.9+,
   so for Python 3.8 support the 'tensorflow' requirements need to use the
   previous more verbose conditionals.
* Reverts PR https://github.com/scikit-hep/pyhf/pull/ 2448
@matthewfeickert matthewfeickert added fix A bug fix build Changes that affect the build system or external dependencies need-to-backport tmp label until can be backported to patch release branch labels Mar 12, 2024
@matthewfeickert matthewfeickert self-assigned this Mar 12, 2024
Copy link

codecov bot commented Mar 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.28%. Comparing base (c09738d) to head (c97bb40).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2452   +/-   ##
=======================================
  Coverage   98.28%   98.28%           
=======================================
  Files          69       69           
  Lines        4539     4539           
  Branches      803      803           
=======================================
  Hits         4461     4461           
  Misses         45       45           
  Partials       33       33           
Flag Coverage Δ
contrib 97.86% <ø> (ø)
doctest 98.14% <ø> (ø)
unittests-3.10 96.29% <ø> (ø)
unittests-3.11 96.29% <ø> (ø)
unittests-3.8 96.32% <ø> (ø)
unittests-3.9 96.34% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@matthewfeickert matthewfeickert merged commit adddb07 into main Mar 12, 2024
24 of 25 checks passed
@matthewfeickert matthewfeickert deleted the build/use-tfp-with-tf-keras branch March 12, 2024 21:39
@matthewfeickert
Copy link
Member Author

@meeseeksdev backport to release/v0.7.x

Copy link

lumberbot-app bot commented May 29, 2024

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout release/v0.7.x
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 adddb0797c564a0158a8e2e69a58ee1f98604bf7
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #2452: build: Determine tensorflow-probability requirements from python version'
  1. Push to a named branch:
git push YOURFORK release/v0.7.x:auto-backport-of-pr-2452-on-release/v0.7.x
  1. Create a PR against branch release/v0.7.x, I would have named this PR:

"Backport PR #2452 on branch release/v0.7.x (build: Determine tensorflow-probability requirements from python version)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

@matthewfeickert matthewfeickert removed the need-to-backport tmp label until can be backported to patch release branch label May 29, 2024
matthewfeickert added a commit that referenced this pull request May 29, 2024
…ython version (#2491)

* Backport PR #2452
* Split the requirements for the 'tensorflow' extra into two different
  conditional groups by python_version.
   - Starting with tensorflow v2.16.1, multiple changes were made that simplifies
   the installation of tensorflow across platform_machine and Keras v3.0 was adopted.
   - tensorflow-probability did _not_ adopt Keras v3.0, but instead requires
   tf-keras. Starting in tensorflow-probability v0.24.0 the
   'tensorflow-probability[tf]' extra was added which includes all the required
   dependencies to be able to use tensorflow-probability with tensorflow v2.15+.
   - tensorflow v2.16.1 and tensorflow-probability v0.24.0 support Python 3.9+,
   so for Python 3.8 support the 'tensorflow' requirements need to use the
   previous more verbose conditionals.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Changes that affect the build system or external dependencies fix A bug fix
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Switch to using 'tensorflow' for Apple silicon Macs for TensorFlow v2.16.1+
1 participant